#include <iostream>
#include "ShareMemory.hpp"
#include "Fifo.hpp"
#include "Time.hpp"

int main()
{
    
    shm.GetShm();
    shm.AttachShm();

    gpipe.OpenPipeForWrite();
    // 进行IPC
    struct Date *image = (struct Date *)shm.GetAddr();

    while (true)
    {
        strcpy(image->_status, "最新");
        strcpy(image->_lasttime, GetCurTime().c_str());
        strcpy(image->_image, "xxxxxxxxxxxxxxxxxxxxxxxxxx");

        gpipe.Signal();
        sleep(3);
    }
    shm.DetachShm();
    return 0;
}